#include"Heap.h"

void test1()
{
	int arr[] = { 2,4,6,8,4,100,8,2,58,48,99,29 };
	arrprint(arr, sizeof(arr) / sizeof(arr[0]));
	InsertSort(arr, sizeof(arr) / sizeof(arr[0]));
	arrprint(arr, sizeof(arr) / sizeof(arr[0]));
}

void test2()
{
	int arr[] = { 3,5,7,9,3,4,6,1,5,6,399,88,47,209,34 };
	int i = sizeof(arr) / sizeof(arr[0]);
	arrprint(arr, i);
	ShellSort(arr, i);
	arrprint(arr, i);
}

void test3()
{
	int arr[] = { 8,8,8,8,8,8 };
	//int arr[] = { 3,5,7,9,3,4,6,1,5,6,399,88,47,209,34 };
	int i = sizeof(arr) / sizeof(arr[0]);
	arrprint(arr, i);
	SelectSort(arr, i);
	arrprint(arr, i);
}
void test4()
{
	int arr[] = { 3,5,7,9,3,4,6,1,5,6,399,88,47,209,34 };
	//int arr[] = { 8,8,8,8,8,8 };
	//int arr[] = { 0 };
	int i = sizeof(arr) / sizeof(arr[0]);
	arrprint(arr, i);
	HeapSort(arr, i);
	arrprint(arr, i);
}

void test5()
{
	int arr[] = { 3,5,7,9,3,4,6,1,5,6,399,88,47,209,34 };
	int i = sizeof(arr) / sizeof(arr[0]);
	arrprint(arr, i);
	QuickSortNonR(arr,0,i-1);
	arrprint(arr, i);

}
void test6()
{
	int arr[] = { 3,5,7,9,3,4,6,1,5,6,399,88,47,209,34 };
	//int arr[] = { 8,8,8,8,8,8,8,8 };
	int i = sizeof(arr) / sizeof(arr[0]);
	arrprint(arr, i);
	MergeSortNonR(arr,i);
	arrprint(arr, i);
}
void test7()
{
	int arr[] = { 3,5,7,9,3,4,6,1,5,6,399,88,47,209,34 };
	//int arr[] = { 8,8,8,8,8,8,8,8 };
	int i = sizeof(arr) / sizeof(arr[0]);
	arrprint(arr, i);
	CountSort(arr, i);
	arrprint(arr, i);
}

int main()
{
	/*test1();
	test2();
	test3();
	test4();*/
	//test5();
	test6();
	//test7();
	char arr[] = "abcd";
	for (int i = 0; i < 4; i++)
	{
		printf("%c ", arr[i] - 32);
	}
	return 0;
}